<script type="text/javascript" src="../media/system/js/jQuery.vietvang.validate.js"></script>
	<script type="text/javascript">
		jq(document).ready(function(){
			jq('#adminForm').validate({
			});
		});
</script>
<form action="index.php?option=com_center" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
        <fieldset class="adminform" >
        <table >
        <tr>
            <td>
              
                <fieldset id="jform_showclubcenter" class="radio">
                <?php
                    if(!$this->is_Club){
                ?>
                    <input disabled="false" type="radio" id="rd1" name="jform[rd_centerclub]" value="1" checked="checked" onclick="showcenter()" />
                    <label for="rd1">海洋センター情報</label>
                    <input disabled="false"  type="radio" id="rd2" name="jform[rd_centerclub]" value="0" onclick="showclub()" />
                    <label for="rd2">海洋クラブ情報</label>
                <?php
                    }else{
                ?>
                    <input disabled="false" type="radio" id="rd1" name="jform[rd_centerclub]" value="1"  onclick="showcenter()" />
                    <label for="rd1">海洋センター情報</label>
                    <input disabled="false" type="radio" id="rd2" name="jform[rd_centerclub]" value="0" checked="checked" onclick="showclub()" />
                    <label for="rd2">海洋クラブ情報</label>
                <?php
                    }
                ?>
                    <input type="hidden" name="jform[check_cc]" id="check_cc" value="" />
                </fieldset>
               
            </td>
            
        </tr>
        </table>
        </fieldset>
        <fieldset>
        <table style="width: 750px" border=0>
            <tr>
                <td class="text">センター・クラブコード<span class="err" >※</span></td>
                <td style="line-height: 23px;">
                    <input type="text" value="<?php echo $this->row->OCBA_CODE; ?>" name="jform[OCBA_CODE]" readonly="" class="inputbox medium readonly" />                    
                </td>
                <td></td>
            </tr>
            <tr>
                <td class="text" style="width:245px">名称<span class="err">※</span></td>
                <td style="width:200px">
                    <input type="text" data_required="true" vvName="fullname" value="<?php echo $this->row->OCBA_NAME; ?>" name="jform[OCBA_NAME]" class="inputbox medium" />
                    <span name="msg_error" ></span>
                </td>
                <td class="text" style="width:150px">略称<span class="err">※</span></td>
                <td style="width:200px">
                    <input type="text" data_required="true" vvName="fullname" value="<?php echo $this->row->OCBA_SHOR; ?>" name="jform[OCBA_SHOR]" class="inputbox medium" />
                    <span name="msg_error" ></span>
                </td>
            </tr>
            <tr>
                <td class="text">カナ<span class="err">※</span></td>
                <td>
                    <input type="text"  data_required="true" vvName="fullname" value="<?php echo $this->row->OCBA_KANA; ?>" name="jform[OCBA_KANA]" class="inputbox medium" />
                    <span name="msg_error" ></span>
                </td>

<td id="lbloaihinh" align="right" class="text" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">建設時類型<br>
                     <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(センターのみ)</span></td>

                <td  id="loaihinh" >
                    <input type="text" id="jformOCBA_loaihinh_CODE" readonly="true" value="<?php echo $this->row->OCBA_LOAIHINH; ?>" name="jform[OCBA_loaihinh_CODE]" class="inputbox medium"/>
                    <a href="#" id="link_loaihinh_code" class="line-height28">検索</a>
                </td>
            </tr>
            <tr>

                 <td align="right" class="text" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">期別コード<br>
                     <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(センターのみ)</span></td>

                <td>
                    <input type="text" id="jformOCBA_TERM_CODE" readonly="true" value="<?php echo $this->row->OCBA_TERM_CODE; ?>" name="jform[OCBA_TERM_CODE]" class="inputbox medium" />
                    <a href="#" id="link_ocba_term_code" class="line-height28">検索</a>
                </td>
                <td id="lbcenter" class="text" >類型詳細コード<br> <span style="padding-right: 10px;width:175px;color: red;font-size: 8px;vertical-align: top;" class="text-align-right">(センターのみ)</span></td>
                <td  id="center" >
                    <input type="text" id="jformOCBA_PETT_CODE" readonly="true" value="<?php echo $this->row->OCBA_PETT_CODE; ?>" name="jform[OCBA_PETT_CODE]" class="inputbox medium"/>
                    <a href="#" id="link_ocba_pett_code" class="line-height28">検索</a>
                </td>

                <td class="lb"id="lbclubdepend" align="right" class="text" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">センター<span class="err">※</span><br>
                     <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(クラブのみ)</span></td>

                <td id="clubdepend">
                    <input type="text" id="jformOCBA_CLUB_DEPEND" readonly="true" value="<?php echo $this->row->OCBA_CLUB_DEPEND; ?>" name="jform[OCBA_CLUB_DEPEND]" class="inputbox medium" />
                    <a href="#" id="link_ocba_depend" class="line-height28">検索</a>
                </td>
            </tr>
            <tr>
                <td class="text">市町村コード<span class="err">※</span></td>
                <td>
                    <input type="text" id="jformOCBA_TOWN_CODE" readonly="true" value="<?php echo $this->row->OCBA_TOWN_CODE; ?>" name="jform[OCBA_TOWN_CODE]" class="inputbox medium" />
                    <a href="#" id="link_ocba_town_code" class="line-height28">検索</a>
                </td>

                <td id="lbclub" align="right" class="text" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">クラブ詳細コード<span class="err">※</span><br>
                     <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(クラブのみ)</span></td>

                <td id="club">
                    <input type="text" id="jformOCBA_CLUB_CODE" readonly="true" value="<?php echo $this->row->OCBA_CLUB_CODE; ?>" name="jform[OCBA_CLUB_CODE]" class="inputbox medium" />
                    <a href="#" id="link_ocba_club_code" class="line-height28">検索</a>
                </td>
            </tr>
            <tr>

                
 　　　　　　　　<td align="right" class="text" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">クラブ支援団体名<br>
                     <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(クラブのみ)</span></td>


                <td><input type="text" value="<?php echo $this->row->OCBA_SUPP; ?>" name="jform[OCBA_SUPP]" class="inputbox medium" /></td>
                <td></td>
                
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td><span class="err">※印は入力必須項目です。</span></td>
            </tr>
         </table>   
         </fieldset>
         
         
         <fieldset  id="adminformfieldset">
         <legend>所在地</legend> 
         <table border=0 style="width: 650px;">
            <!--<tr>
                <td colspan="6"><label>? 所在地</label></td>
            </tr>-->
            <tr>
                <td style="width: 75px"><label style="padding-right: 10px;width:190px;" class="text-align-right">郵便番号</label></td>
                <td style="width: 200px">
                    <input type="text" vvName="postcode" value="<?php echo $this->row->OCBA_POST; ?>" name="jform[OCBA_POST]" class="inputbox medium" />
                    <span name="msg_error"></span>
                </td>
               <td style="width: 75px"></td>
                <td style="width: 200px"></td>
            </tr>
             <tr>
                <td class="text middle">住所1</td>
                <td colspan="3">
                <textarea name="jform[OCBA_ADD1]" class="inputbox bigx"><?php echo $this->row->OCBA_ADD1; ?></textarea>
                </td>
            </tr>
             <tr>
                <td class="text middle">住所2</td>
                <td colspan="3"><textarea name="jform[OCBA_ADD2]" class="inputbox bigx"><?php echo $this->row->OCBA_ADD2; ?></textarea></td>
            </tr>
            <tr>
                <td class="text">電話番号</td>
                <td>
                    <input type="text" vvName="phone" value="<?php echo $this->row->OCBA_TEL; ?>" name="jform[OCBA_TEL]" class="inputbox medium" />
                    <span name="msg_error"></span>    
                </td>
                <td style="vertical-align: top;"><label style="padding-right: 10px;width:50px;line-height: 20px;" class="text-align-right">FAX番号</label></td>
                <td>
                    <input type="text" vvName="fax" value="<?php echo $this->row->OCBA_FAX; ?>" name="jform[OCBA_FAX]" class="inputbox medium" />
                    <span name="msg_error"></span>
                </td>
            </tr>
        </table>    
        </fieldset>
         
        <fieldset id="adminformfieldset">    
        <legend>連絡先</legend>
        <table border=0 style="width: 650px;">    
             <!--<tr><td colspan="6"><label>?連絡先</label></td></tr>-->
            <tr>
                <td style="width: 75px"><label style="padding-right: 10px;width:190px;" class="text-align-right">連絡先名</label></td>
                 <td style="width: 220px"><input type="text" value="<?php echo $this->row->OCBA_LNAME; ?>" name="jform[OCBA_LNAME]" class="inputbox medium" /></td>
            </tr>
            <tr>
                <td class="text">郵便番号</td>
                <td style="width: 190px;">
                    <input type="text" vvName="postcode" value="<?php echo $this->row->OCBA_LPOST; ?>" name="jform[OCBA_LPOST]" class="inputbox medium" />
                    <span name="msg_error"></span>
                </td>
                <td style="width: 75px"></td>
                <td style="width: 220px"></td>
            </tr>
             <tr>
                <td class="text middle">住所1</td>
                <td colspan="3"><textarea name="jform[OCBA_LADD1]" class="inputbox bigx"><?php echo $this->row->OCBA_LADD1; ?></textarea></td>
            </tr>
             <tr>
                <td class="text middle">住所2</td>
                <td colspan="3"><textarea name="jform[OCBA_LADD2]" class="inputbox bigx"><?php echo $this->row->OCBA_LADD2; ?></textarea></td>
            </tr>
            <tr>
                <td class="text">電話番号</td>
                <td>
                    <input type="text" vvName="phone" value="<?php echo $this->row->OCBA_LTEL; ?>" name="jform[OCBA_LTEL]" class="inputbox medium" />
                    <span name="msg_error"></span>    
                </td>
                <td><label style="padding-right: 10px;width:50px;line-height: 20px;" class="text-align-right">FAX番号</label></td>
                <td style="vertical-align: top;">
                    <input type="text" vvName="fax" value="<?php echo $this->row->OCBA_LFAX; ?>" name="jform[OCBA_LFAX]" class="inputbox medium" />
                    <span name="msg_error"></span>
                </td>
            </tr>
      </table>      
      </fieldset>
      
    
     <fieldset  id="adminformfieldset">
     <legend>DM送付先</legend>
      <table border=0 style="width: 400px;">       
            <!--<tr><td><label>? DM送付先</label></td></tr>-->
            <tr>
                 <td style="width:150px"><label style="padding-right: 10px;width:190px;vertical-align: top;" class="text-align-right">DM区分</label></td>
                <td style="width:200px">
                    <select id="jformOCBA_DM" name="jform[OCBA_DM]" class="inputbox medium">
                        <?php
                            foreach($this->listdm as $key=>$value){
                        ?>
                        <option value="<?php echo $key; ?>" <?php if($this->row->OCBA_DM == $key){ echo ' selected = "selected" '; } ?> ><?php echo $value; ?></option>
                        <?php
                            }
                        ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="text">DM宛先名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_DNAME; ?>" name="jform[OCBA_DNAME]" class="inputbox medium" /></td>

            <tr>
                <td class="text">郵便番号</label></td>
                <td>
                    <input type="text" vvName="postcode" value="<?php echo $this->row->OCBA_DPOST; ?>" name="jform[OCBA_DPOST]" class="inputbox medium" />
                    <span name="msg_error"></span>
                </td>

            </tr>
            <tr>
                <td class="text middle">住所1</td>
                <td colspan="3"><textarea name="jform[OCBA_DADD1]" class="inputbox bigx"><?php echo $this->row->OCBA_DADD1; ?></textarea></td>
                
            </tr>
             <tr>
                <td class="text middle">住所2</td>
                <td colspan="3"><textarea name="jform[OCBA_DADD2]" class="inputbox bigx"><?php echo $this->row->OCBA_DADD2; ?></textarea></td>
                
            </tr>
            <!--<tr>
                <td><label>電話番号</label></td>
                <td>
                    <input type="text" vvName="phone" value="<''?php echo $this->row->OCBA_DTEL; ?'>" name="jform[OCBA_DTEL]" class="inputbox medium" />
                    <span name="msg_error"></span>    
                </td>
                <td class="text-align-right"><label>FAX番号</label></td>
                <td>
                    <input type="text" vvName="fax" value="<''?php echo $this->row->OCBA_DFAX; ?'>" name="jform[OCBA_DFAX]" class="inputbox medium" />
                    <span name="msg_error"></span>
                </td>
            </tr>-->
        </table>
        </fieldset>
        
        <fieldset class="adminform">
         <table style="width: 900px;" border=0>    
            
            <tr>
                <td class="text" style="width: 190px;">役場メール担当者名</td>
                <td style="width: 200px;"><input type="text" value="<?php echo $this->row->OCBA_YNAME; ?>" name="jform[OCBA_YNAME]" class="inputbox medium" /></td>
                <td style="width: 175px;" class="text">役場メールアドレス</td>
                <td >
                    <input type="text" vvName="email" value="<?php echo $this->row->OCBA_YMAIL; ?>" name="jform[OCBA_YMAIL]" class="inputbox medium" />
                    <span name="msg_error"></span> 
                </td>
            </tr>
            <tr>
                <td class="text">教育委員メール担当者名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_ENAME; ?>" name="jform[OCBA_ENAME]" class="inputbox medium" /></td>
                <td class="text">教育委員メールアドレス</td>
                <td>
                    <input type="text" vvName="email" value="<?php echo $this->row->OCBA_EMAIL; ?>" name="jform[OCBA_EMAIL]" class="inputbox medium" />
                    <span name="msg_error"></span>    
                </td>
            </tr>
            <tr>
                <td class="text">担当者メール担当者名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_TNAME; ?>" name="jform[OCBA_TNAME]" class="inputbox medium" /></td>
                <td class="text">担当者メールアドレス</td>
                <td>
                    <input type="text" vvName="email" value="<?php echo $this->row->OCBA_TMAIL; ?>" name="jform[OCBA_TMAIL]" class="inputbox medium" />
                    <span name="msg_error"></span> 
                </td>
            </tr>
            <tr>
                <td class="text">センター・クラブ代表メール_担当部署名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_CNAME; ?>" name="jform[OCBA_CNAME]" class="inputbox medium" />
                </td>
                <td class="text">センター・クラブ代表メールアドレス</td>
                <td>
                    <input type="text" vvName="email" value="<?php echo $this->row->OCBA_CMAIL; ?>" name="jform[OCBA_CMAIL]" class="inputbox medium" />
                     <span name="msg_error"></span> 
                </td>
            </tr>
            <tr>
                <td class="text">その他メール担当者名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_ONAME; ?>" name="jform[OCBA_ONAME]" class="inputbox medium" />
                </td>
                <td class="text">その他メールアドレス</td>
                <td>
                    <input type="text" vvName="email" value="<?php echo $this->row->OCBA_OMAIL; ?>" name="jform[OCBA_OMAIL]" class="inputbox medium" />
                    <span name="msg_error"></span> 
                </td>
            </tr>
            <tr>
                <td class="text">HPアドレス</td>
                <td colspan="3">
                    <input type="text" vvName="website" value="<?php echo $this->row->OCBA_URL; ?>" name="jform[OCBA_URL]" class="inputbox sizexxx" />
                    <span name="msg_error"></span>
                </td>
                
            </tr>
            <tr>
                <td class="text">地図情報URL</td>
                <td colspan="3" style="line-height: 23px;">
                    <input type="text" vvName="website"  value="<?php echo $this->row->OCBA_MURL; ?>" name="jform[OCBA_MURL]" class="inputbox sizexxx" />
                    <span name="msg_error"></span>    
                </td>
            </tr>
            <tr>
                <td class="text">所長/代表者名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_HEAD; ?>" name="jform[OCBA_HEAD]" class="inputbox medium" /></td>
                <td class="text" >連絡担当者名</td>
                <td><input type="text" value="<?php echo $this->row->OCBA_CONT; ?>" name="jform[OCBA_CONT]" class="inputbox medium" /></td>
            </tr>
            <tr>

 　　　　　　　　<td class="text middle" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">委託先名<br/>
                   <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(センターのみ)</span></td>

                <td colspan="3">
                <textarea name="jform[OCBA_ENTR]" class="sizexx"><?php echo $this->row->OCBA_ENTR; ?></textarea>
                </td>
            </tr>
            <tr>
                <td class="text">開設年月日</td>
                <td>
                    <?php if($this->row->OCBA_SDATE != 0){ $dt = date('Y-m-d',strtotime($this->row->OCBA_SDATE));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[OCBA_SDATE]', 'jformOCBA_SDATE');?><!--<input type="text" name="jform[OCBA_SDATE]" class="inputbox medium" />-->
                    <!--<span name="msg_error"></span>-->
                </td>
                <td class="text">譲渡年月日</td>
                <td>
                    <?php if($this->row->OCBA_TDATE != 0){ $dt = date('Y-m-d',strtotime($this->row->OCBA_TDATE));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[OCBA_TDATE]', 'jformOCBA_TDATE');?><!--<input type="text" name="jform[OCBA_TDATE]" class="inputbox medium" />-->
                    <!--<span name="msg_error"></span>-->
                </td>
            </tr>
            <tr>
                <td class="text"> 廃止年月日</td>
                <td>
                    <?php if($this->row->OCBA_EDATE != 0){ $dt = date('Y-m-d',strtotime($this->row->OCBA_EDATE));}else{ $dt=null;} echo JHtml::calendar($dt, 'jform[OCBA_EDATE]', 'jformOCBA_EDATE');?><!--<input type="text" name="jform[OCBA_EDATE]" class="inputbox medium" />-->
                    <!-- <span name="msg_error"></span> -->
                </td>
                
            </tr>
            <tr>
                <td class="text">休部</td>
                <td colspan="2">
                    <fieldset id="jform_showtitle" class="radio">
                    <?php
                        if($this->row->OCBA_EFLAG == 0){
                    ?>
                        <input type="radio" id="jform_showtitle0" name="jform[OCBA_EFLAG]" value="0" checked="checked"  />
                        <label for="jform_showtitle0">活動中</label>
                        <input type="radio" id="jform_showtitle1" name="jform[OCBA_EFLAG]" value="1" />
                        <label for="jform_showtitle1">休部</label>
                    <?php
                        }else{
                    ?>
                        <input type="radio" id="jform_showtitle0" name="jform[OCBA_EFLAG]" value="0"   />
                        <label for="jform_showtitle0">活動中</label>
                        <input type="radio" id="jform_showtitle1" name="jform[OCBA_EFLAG]" value="1" checked="checked" />
                        <label for="jform_showtitle1">休部</label>
                    <?php
                        }
                    ?>
                        </fieldset>
                </td>
                <td></td>
            </tr>
            
            <tr>

　　　　　　　　<td class="text middle" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">開館/閉館時間<br>
                    <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(センターのみ)</span>
                
                <td colspan="3"><textarea name="jform[OCBA_STIME]" class="sizexx"><?php echo $this->row->OCBA_STIME; ?></textarea></td>
            </tr>
            
            <!-- SAU NAY SE XOA
            <tr>
                <td><label style="padding-right: 10px;width:175px;" class="text-align-right">開館時間</label></td>
                <td><input type="text" value="<?php echo $this->row->OCBA_STIME; ?>" name="jform[OCBA_STIME]" class="inputbox medium" /></td>
                <td  ><label style="padding-right: 10px;width:175px;" class="text-align-right">閉館時間</label></td>
                <td><input type="text" value="<?php echo $this->row->OCBA_ETIME; ?>" name="jform[OCBA_ETIME]" class="inputbox medium" /></td>
            </tr>
            -->
            <tr>
                <td class="text">開館期間</td>
                <td colspan="3"><textarea name="jform[OCBA_PERI]" class="sizexx"><?php echo $this->row->OCBA_PERI; ?></textarea></td>
            </tr>
            <tr>
                

　　　　　　　　<td class="text" style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">休館日<br>
                         <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(センターのみ)</span>

                <td>
                    <input type="text" value="<?php echo $this->row->OCBA_REST; ?>" name="jform[OCBA_REST]" class="inputbox medium" />
                    <span name="msg_error"></span>    
                </td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td class="text middle">PR</td>
                <td colspan="3"><textarea name="jform[OCBA_PR]" class="sizexx"><?php echo $this->row->OCBA_PR; ?></textarea></td>
            </tr>
            <tr>
                <td class="text">画像ファイル</td>
                <td>
                    <?php HelperBG::getLibUploadify(); ?>
                    <?php HelperBG::getUpload('jformOCBA_IMG', $this->row->OCBA_IMG, 'uploads/images/com_center'); ?>
                </td>
                <td class="text">旧映像:</td>
                <td><input type="text" name="jformOCBA_IMG_OLD" value="<?php echo $this->row->OCBA_IMG; ?>" readonly="true" class="inputbox medium readonly" /></td>
            </tr>
            <tr>
                <td></td>
                <td colspan="3"><label style="font-size: 1.091em;color:blue;line-height: 30px;">(推奨される画像の縦横比は「3:4」です。)</label></td>
            </tr>
            <tr>
                <td class="text">特徴</td>
                <td colspan="3">
                    <fieldset id="jform_showtitle" class="radio">
                    <table>
                        <tr>
                            <?php 
                            $i = 0;
                            foreach($this->listacti as $key=>$value){
                                $i++;
                                
                        ?>
                            <td>
                            <input type="checkbox" name="cb<?php echo $key; ?>" id="cb<?php echo $key; ?>"
                                <?php
                                    if($key == 1 && $this->row->OCBA_PUTF == 1 || $key == 2 && $this->row->OCBA_LARF == 1
                                         || $key == 3 && $this->row->OCBA_CANF == 1 || $key == 4 && $this->row->OCBA_YACF == 1
                                         || $key == 5 && $this->row->OCBA_SCHF == 1 || $key == 6 && $this->row->OCBA_OUTF == 1 ){
                                            echo ' checked="checked" ';
                                        }
                                ?>
                             value="<?php echo $key; ?>"  /><label for="cb<?php echo $key; ?>"><?php echo $value; ?></label></td>
                        <?php
                                if($i==3){
                                    $i=0;
                                    echo "</tr><tr>";
                                } 
                            }
                        ?>
                        </tr>
                    </table>
                        
                    </fieldset>
                                      
                </td>
            </tr>
            <tr>

　　　　　　　　<td class="text"  style="line-height: 15px;padding-right: 10px;vertical-align: top;padding-top: 10px;float: right;">その他施設情報<br>
                <span style="color: red;font-size: 8px;vertical-align: top;align: right;">(センターのみ)</span>

               　<td colspan="3">
                    <input type="text" name="jform[OCBA_INST]" class="inputbox sizexxx" value="<?php echo $this->row->OCBA_INST; ?>" />
                </td>
            </tr>
            <tr>
                <td class="text">コンパス利用場所コード</td>
                <td colspan="3">
                    <select name="jform[OCBA_COMA_CODE]" id="jformOCBA_COMA_CODE"  class="inputbox medium">
                      <?php
                      $listcoma = $this->listcoma;
                      if($listcoma != null){
                        foreach($this->listcoma as $value){
                      ?>
                      <option value="<?php echo $value->COMA_CODE; ?>" <?php if($this->row->OCBA_COMA_CODE == $value->COMA_CODE){ echo ' selected = "selected" ';} ?> >
                      <?php echo $value->COMA_NAME; ?></option>
                      <?php
                        }}
                      ?>
                   </select>
                </td>
            </tr>
            <tr>
                <td><label style="padding-right: 10px;width:190px;" class="text-align-right">コンパス利用場所詳細</label></td>
                <td colspan="3">
                    <input type="text" name="jform[OCBA_CODT]" class="inputbox sizexxx" value="<?php echo $this->row->OCBA_CODT; ?>" />
                </td>
            </tr>
        </table>
        </fieldset>
        
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="action" value="edit" />
        
   
      
</form>
<script>
    jq(document).ready(function() {
        var zb;
        // show a dialog box when clicking on a link
        jq('#link_ocba_term_code').bind('click', function(e) {
            e.preventDefault();
            zb = new jq.Zebra_Dialog('', {
                source:  {'ajax': 'index.php?option=com_center&views=bg&task=popup_term&tmpl=component'},
                height: 800,
                width: 550,
                title:  '四半期検索',
                type:  '',
                buttons:  [
                    {caption: '閉じる', callback: function() { }}
                        
                ]
                               
            });
        }); 
        
        
        jq(".link_term_code").live("click",function(){
            var id = jq("#term_code_temp").val();
            jq("#jformOCBA_TERM_CODE").val(id);
            zb.close();
        });
        
        
        //show a dialog box: town search
        jq('#link_ocba_town_code').bind('click', function(e) {
            e.preventDefault();
            zb = new jq.Zebra_Dialog('', {
                source:  {'ajax': 'index.php?option=com_center&views=bg&task=popup_town&tmpl=component'},
                height: 800,
                width: 550,
                title:  '市町村検索',
                type:  '',
                buttons:  [
                    {caption: '閉じる', callback: function() { }}
                        
                ]                                  
                               
            });
        });
        
        jq(".link_town_code").live("click",function(){
            var id = jq("#town_code_temp").val();
            jq("#jformOCBA_TOWN_CODE").val(id);
            zb.close();
        });
        
        
        
        //show a dialog box: pett search
        jq('#link_loaihinh_code').bind('click', function(e) {
            e.preventDefault();
                zb = new jq.Zebra_Dialog('', {
                    source:  {'ajax': 'index.php?option=com_center&views=bg&task=popup_loaihinh&tmpl=component'},
                    height: 800,
                    width: 550,
                    title:  '建設時類型',
                    type:  '',
                    buttons:  [
                        {caption: '閉じる', callback: function() { }}
                            
                    ]
                });
            });
            
            
        //loai hinh
        jq(".link_loaihinh_code").live("click",function(){
            var id = jq("#loaihinh_code_temp").val();
            jq("#jformOCBA_loaihinh_CODE").val(id);
            zb.close();
        });
        
        
        
        //show a dialog box: pett search
        jq('#link_ocba_pett_code').bind('click', function(e) {
            e.preventDefault();
                zb = new jq.Zebra_Dialog('', {
                    source:  {'ajax': 'index.php?option=com_center&views=bg&task=popup_pett&tmpl=component'},
                    height: 800,
                    width: 550,
                    title:  '類型詳細検索',
                    type:  '',
                    buttons:  [
                        {caption: '閉じる', callback: function() { }}
                            
                    ]
                });
            });
            
       jq(".link_pett_code").live("click",function(){
            var id = jq("#pett_code_temp").val();
            jq("#jformOCBA_PETT_CODE").val(id);
            zb.close();
        });     
        
            
        //show a dialog box: club search
        jq('#link_ocba_club_code').bind('click', function(e) {
            e.preventDefault();
                zb = new jq.Zebra_Dialog('', {
                    source:  {'ajax': 'index.php?option=com_center&views=bg&task=popup_club&tmpl=component'},
                    height: 800,
                    width: 550,
                    title:  'クラブ検索',
                    type:  '',
                    buttons:  [
                        {caption: '閉じる', callback: function() { }}
                            
                    ]
                });
            });
            
        jq(".link_club_code").live("click",function(){
            var id = jq("#club_code_temp").val();
            jq("#jformOCBA_CLUB_CODE").val(id);
            zb.close();
        }); 
            
       //show a dialog box: ocba depend search
        jq('#link_ocba_depend').bind('click', function(e) {
            e.preventDefault();
                zb = new jq.Zebra_Dialog('', {
                    source:  {'ajax': 'index.php?option=com_center&views=bg&task=popup_ocba&tmpl=component'},
                    height: 800,
                    width: 550,
                    title:  'センター検索',
                    type:  '',
                    buttons:  [
                        {caption: '閉じる', callback: function() { }}
                            
                    ]
                });
            });
            
        jq(".link_ocba_depend").live("click",function(){
            var id = jq("#center_code_temp").val();
            jq("#jformOCBA_CLUB_DEPEND").val(id);
            zb.close();
        }); 
            
            
            //show textbox when click radio button
            <?php
                if(!$this->is_Club){
            ?>
                jq('#club').hide();
                jq('#clubdepend').hide();
                jq('#center').show();
                jq('#lbclub').hide();
                jq('#lbclubdepend').hide();
                jq('#lbcenter').show(); 
                
                /* kiem tra center or club*/
                document.getElementById("check_cc").value=1;
            <?php
                }else{
            ?>
                jq("#club").show();
                jq("#clubdepend").show();
                jq("#center").hide();
                jq("#lbclubdepend").show();
                jq("#lbcenter").hide();
                
                /* kiem tra center or club*/
                document.getElementById("check_cc").value=0;
            <?php
                }
            ?>
            
                   
    });  
        
     
     //click radio button
     function showclub()
    {        
        jq("#club").show();       
        jq("#clubdepend").show();
        jq("#center").hide();
        jq("#lbclub").show();
        jq("#lbclubdepend").show();
        jq("#lbcenter").hide();
        //reset value
        jq("#jformOCBA_PETT_CODE").val('');
        
        /* kiem tra center or club*/
        document.getElementById("check_cc").value=0;
    }
    
    function showcenter()
    {      
        jq('#club').hide();
        jq('#clubdepend').hide();
        jq('#center').show();
        jq('#lbclub').hide();
        jq('#lbclubdepend').hide();
        jq('#lbcenter').show();
        //reset value
        jq("#jformOCBA_CLUB_CODE").val('');
        jq("#jformOCBA_CLUB_DEPEND").val('');
        
        /* kiem tra center or club*/
        document.getElementById("check_cc").value=1;
    }

    //calendar SDATE
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformOCBA_SDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformOCBA_SDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    //calendar TDATE
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformOCBA_TDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformOCBA_TDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    //calendar EDATE
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformOCBA_EDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformOCBA_EDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
</script>
